<?php

namespace editComments;

class editComments{
	private $con;
	
	public function __construct(){
			
		$this->con = mysqli_connect("10.101.1.88", "167620_mz14316", "Asd33e5fg", "167620-benny");
	
		// Check connection
		if (mysqli_connect_errno())
		{
		echo "Failed to connect to MySQL: " . mysqli_connect_error();
		}
	}
	
	//edits comment in database		
	public function fixComment($editId, $newComment){
		
		mysqli_query($this->con,"UPDATE comments SET comments='$newComment'
		WHERE UniqueId='$editId'");

			mysqli_close($this->con);
			echo"succeded to edit comment";	
	}
}